package com.xuecheng.system.controller;

import com.xuecheng.api.sysetm.CategoryApi;
import com.xuecheng.api.sysetm.model.dto.CourseCategoryDTO;
import com.xuecheng.system.service.CourseCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 课程分类 前端控制器
 * </p>
 *
 * @author itcast
 */
@Slf4j
@RestController
public class CourseCategoryController implements CategoryApi {

    @Autowired
    private CourseCategoryService  courseCategoryService;

   @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryDTO> queryAll() {

      return courseCategoryService.queryAll();
    }
}
